package com.lecyon.farm.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Yao Zheng
 * @Date 2020/4/14 11:23
 */
@FeignClient(name = "tuoguan", url = "http://tuoguan.lecyon.com", path = "fm/a")
public interface ITuoguanClient {

    /**
     * 登录接口
     *
     * @param username
     * @param password
     * @param validCode
     * @param rememberUserCode
     * @param rememberMe
     * @return
     */
    @PostMapping("/login")
    String login(@RequestParam("username") String username, @RequestParam("password") String password, @RequestParam("validCode") String validCode, @RequestParam("rememberUserCode") String rememberUserCode, @RequestParam("rememberMe") String rememberMe);

    /**
     * 2.2 作业信息推送接口
     *
     * @param json
     * @return
     */
    @PostMapping("/jobInfo/machineJob")
    String syncMachineJob(@RequestBody String json);

    /**
     * 2.3 重复明细推送接口
     *
     * @param json
     * @return
     */
    @PostMapping("/jobInfo/jobOverLap")
    String syncJobOverLap(@RequestBody String json);

    /**
     * 2.4 位置信息推送接口
     *
     * @param json
     * @return
     */
    @PostMapping("/location/machineTrials")
    String syncMachineTrails(@RequestBody String json);

    /**
     * 2.5 地块信息推送接口
     *
     * @param json
     * @return
     */
    @PostMapping("/plotInfo/pushLot")
    String syncPlotInfo(@RequestBody String json);

    /**
     * 2.6 作业轨迹信息推送接口
     *
     * @param json
     * @return
     */
    @PostMapping("/tranceInfo/pushTrace")
    String syncTraceInfo(@RequestBody String json);

    /**
     * 2.7 图片信息接入接口
     *
     * @param json
     * @return
     */
    @PostMapping("/photoInfo/pushPhoto")
    String syncPhotoInfo(@RequestBody String json);

    /**
     * 2.8 数据核检接口
     *
     * @param json
     * @return
     */
    @PostMapping("/jobInfo/dataVerification")
    String syncDataVerification(@RequestBody String json);

}
